<div id="main_form">
<h3><span class="color_green">Online Test</span> for <?php echo (isset($category_data['category_name'])) ? $category_data['category_name']: 'NA'?></h3>
<fieldset>
<form name="frm_submit_test" id="frm_submit_test" action="<?php echo site_url('/questions/check') ?>" method="post">
	<?php if(isset($questions_data) && count($questions_data) > 0){ ?>		
	
		<?php $i=1; foreach($questions_data as $key => $val){ ?>
			<h4><?php echo $i.' -> '.htmlentities($val['questions_desc']); ?></h4>			
			<?php if(!empty($val['questions_option1'])){ ?>
				<p><input type="radio" name="questions_answer[<?php echo $val['questions_id']; ?>]" value="1" />
				<?php echo htmlentities($val['questions_option1']); ?></p>
			<?php } ?>
			<?php if(!empty($val['questions_option2'])){ ?>
				<p><input type="radio" name="questions_answer[<?php echo $val['questions_id']; ?>]" value="2" />
				<?php echo htmlentities($val['questions_option2']); ?>	</p>			
			<?php } ?>
			<?php if(!empty($val['questions_option3'])){ ?>
				<p><input type="radio" name="questions_answer[<?php echo $val['questions_id']; ?>]" value="3" />
				<?php echo htmlentities($val['questions_option3']); ?>	</p>			
			<?php } ?>
			<?php if(!empty($val['questions_option4'])){ ?>
				<p><input type="radio" name="questions_answer[<?php echo $val['questions_id']; ?>]" value="4" />
				<?php echo htmlentities($val['questions_option4']); ?>	</p>			
			<?php } ?>
		<?php $i++; }//EOF foreach ?>
		<br /><br />
		<input type="submit" name="btn_submit_test" value="Check Your Score Now!"  class="pointer" />&nbsp;&nbsp;&nbsp;<input type="reset" name="btn_reset_test" value="Reset Test!"  class="pointer" />
	<?php }else{ ?>
	<p>Ooops!! no questions found under category <?php echo (isset($category_data['category_name'])) ? $category_data['category_name']: 'NA'?>. <br />Kindly try again later...</p>
	<?php }//EOF if ?>
</form>	
</fieldset>
</div>